package com.zbxx.dto;

import com.zbxx.domain.Successkilled;
import com.zbxx.enums.SeckillStatEnum;

/**
 * @Description: 封装秒杀执行结果状态
 * @Author: zt
 * @CreateDate: 2018/11/3 0003 10:57
 * @UpdateUser: zt
 * @UpdateDate: 2018/11/3 0003 10:57
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public class SeckillExecution {

    private long id;
    //状态
    private int state;
    //状态信息
    private String stateInfo;
    //秒杀成功对象
    private Successkilled successkilled;

    //成功
    public SeckillExecution(long id, SeckillStatEnum statEnum, Successkilled successkilled) {
        this.id = id;
        this.state = statEnum.getState();
        this.stateInfo = statEnum.getStateInfo();
        this.successkilled = successkilled;
    }


    //失败
    public SeckillExecution(long id, SeckillStatEnum statEnum) {
        this.id = id;
        this.state = statEnum.getState();
        this.stateInfo =statEnum.getStateInfo();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public Successkilled getSuccesskilled() {
        return successkilled;
    }

    public void setSuccesskilled(Successkilled successkilled) {
        this.successkilled = successkilled;
    }
}
